package com.onlyphoto.onlymall.mvp.model

import com.onlyphoto.onlymall.api.Urls
import com.onlyphoto.onlymall.base.BaseModel
import com.onlyphoto.onlymall.base.BaseObserver
import com.onlyphoto.onlymall.bean.response.UserInfoBean
import com.onlyphoto.onlymall.utils.ConfigUtil
import com.onlyphoto.onlymall.utils.RxTransformer


class MLoginImpl : BaseModel() {
    fun loginByWx(userInfo: String, baseObserver: BaseObserver<UserInfoBean>) {
        val url = ConfigUtil.instance.getUrl(Urls.WXLOGIN)
        apiService().loginByWx(url, userInfo)
                .compose(RxTransformer.switchSchedulers(this))
                .subscribe(baseObserver)
    }
}

